Skip to content

Conversation

Earlopain
Copy link
Contributor

Something that's been bothering me is that while the source code is not visible by default, the browser still jump to it when searching. Adding the visible property prevents this.

Test it out yourself:

  • bundle exec rdoc
  • open _site/RDoc.html
  • Search for NameError

Before, you will get a match from load_yaml source code, after you only get the match when that methods source code is expanded:
image
image

Something that's been bothering me is that while the source code is
not visible by default, the browser still jump to it when searching.
Adding the `visible` property prevents this.

Test it out yourself:
* `bundle exec rdoc`
* open `_site/index.html`
* Search for `NameError`

Before, you will get a match from `load_yaml` source code, after
you only get the match when that methods source code is expanded.
Copy link
Member

@st0012 st0012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a great improvement, thank you 👍

@st0012 st0012 added the bug label Sep 30, 2024
@st0012 st0012 merged commit 003126c into ruby:master Sep 30, 2024
26 checks passed
matzbot pushed a commit to ruby/ruby that referenced this pull request Sep 30, 2024
expanded
(ruby/rdoc#1181)

Something that's been bothering me is that while the source code is
not visible by default, the browser still jump to it when searching.
Adding the `visible` property prevents this.

Test it out yourself:
* `bundle exec rdoc`
* open `_site/index.html`
* Search for `NameError`

Before, you will get a match from `load_yaml` source code, after
you only get the match when that methods source code is expanded.

ruby/rdoc@003126cc23
@Earlopain Earlopain deleted the dont-search-until-expanded branch September 30, 2024 12:31
@st0012 st0012 added this to the v6.8.0 milestone Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants